
#ifndef _TLV_UTIL_H_
#define _TLV_UTIL_H_

/*WIN32*/
#define		LITTLE_ENDAIN		1
#define		BIG_ENDAIN			0

unsigned char calc_lrc(unsigned char origin, unsigned char const* data, int length);

void _vdStr2HexStr(char const *i_szAsc, unsigned char *ppbt_Byte, int *iByteLength);
void _Int2Byte(int i_Int, unsigned char *us_Byte);
void _vdHex2Str(char const *pstHex, int inLen, char *pstStr);
void _vdHex2String (unsigned char *pstHex, int inLen, char *pstStr);
void _ByteToInt(unsigned char const* usz_In, int i_length, int *i_pOut);
unsigned int _HTONL_(unsigned int h);
unsigned int _NTOHL_(unsigned int h);
unsigned short _HTONS_(unsigned short h); 
int is_big_endian(void);
#endif /* _TLV_UTIL_H_ */
